//
//  FLMTextFieldCell.m
//  FLMSuperS
//
//  Created by xiaoyang on 16/9/15.
//  Copyright © 2016年 FaLaoMiaoNetworkTechnologyCo. All rights reserved.
//

#import "FLMTextFieldCell.h"

@interface FLMTextFieldCell()<UITextFieldDelegate>
@property (nonatomic,strong) UIView  *line;
@end

@implementation FLMTextFieldCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self layoutUI];
    }
    
    return self;
}

- (void)layoutUI
{
    if (!_textField) {
        _textField = [[UITextField alloc]init];
        _textField.delegate = self;
        _textField.placeholder = @"请输入订单号";
        _textField.font = font14;
        [self.contentView addSubview:_textField];
        [_textField mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(@40);
            make.right.equalTo(@-30);
            make.top.equalTo(@5);
            make.height.equalTo(@35);
        }];
        
    }
    
    
    if (!_line) {
        _line = [[UIView alloc]init];
        _line.backgroundColor = [UIColor groupTableViewBackgroundColor];
        [self.contentView addSubview:_line];
        [_line mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.right.equalTo(_textField);
            make.bottom.equalTo(@0);
            make.height.equalTo(@0.5);
        }];
    }
}

@end
